Skip to content

[Repo Assist] test: add 30 unit tests for CsvFile runtime transformation methods#1771

Open
github-actions[bot] wants to merge 5 commits intomainfrom
repo-assist/test-csvruntime-operations-2026-04-30-96fb9e025723b085
Open

[Repo Assist] test: add 30 unit tests for CsvFile runtime transformation methods#1771
github-actions[bot] wants to merge 5 commits intomainfrom
repo-assist/test-csvruntime-operations-2026-04-30-96fb9e025723b085

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Adds 30 unit tests covering CsvFile<'T> runtime transformation methods that previously had zero coverage in FSharp.Data.Core.Tests:

Method Tests added
Filter(predicate) 4 — matching, no-match, all-match, headers preserved
Take(n) 3 — first N, zero, headers preserved
TakeWhile(predicate) 3 — partial, all, none
Skip(n) 3 — skip N, skip-0 identity, headers preserved
SkipWhile(predicate) 2 — partial, none
Truncate(n) 3 — truncate, larger-than-count, zero
Append(rows) 2 — combining sequences, existing rows preserved
Cache() 2 — count preserved, re-enumerable
SaveToString() 5 — headers+data, round-trip, CRLF (RFC 4180), quoting, custom separator
Save(TextWriter) 1 — matches SaveToString output
Chaining 2 — Filter+Take, Skip+Truncate

Why

These transformation methods form a core API for programmatic CSV manipulation. They were testable in isolation but only exercised through type-provider integration tests.

Test Status

  • ✅ All 30 new tests pass
  • ✅ Full suite: 3010 tests pass (0 fail, 2 skipped — known deep-recursion guards)
  • ✅ Fantomas formatting applied

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

Add 30 tests in CsvRuntimeOperations.fs covering the previously untested
transformation API on CsvFile<'T>:

- Filter: predicate-based row filtering
- Take / TakeWhile: row limiting
- Skip / SkipWhile: row skipping
- Truncate: at-most-N rows
- Append: combining row sequences
- Cache: lazy-to-eager caching
- SaveToString / Save(TextWriter): serialisation round-trips, RFC 4180
  CRLF handling, quoting, custom separator
- Operation chaining: Filter+Take, Skip+Truncate

All 3010 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…3 to resolve GHSA-g94r-2vxg-569j

Pre-existing infrastructure failure: OpenTelemetry.Api 1.15.0 has a
known vulnerability that causes the build to fail with NU1902.
Pin to >= 1.15.1 (resolved in 1.15.3) to fix CI.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown
Contributor Author

github-actions Bot commented May 1, 2026

Commit pushed: a59a736

Generated by 🌈 Repo Assist, see workflow run. Learn more.

@dsyme dsyme marked this pull request as ready for review May 1, 2026 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant